package com.wcar.product.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wcar.common.entity.FrontUser;
import com.wcar.common.entity.ProductReview;
import com.wcar.common.vo.Result;
import com.wcar.product.service.RroductReviewService;
import com.wcar.product.service.impl.RroductReviewServiceImpl;
import com.wcar.product.vo.ProductReviewVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/product/review")
public class ProductReviewController {
    @Autowired
    private RroductReviewServiceImpl rroductReviewService;
    @PostMapping("/select")
    public Result<Page<ProductReview>> select(@RequestBody ProductReviewVo productReviewVo) {
        return rroductReviewService.select(productReviewVo);
    }
    @GetMapping("/selectAllUser")
    public Result<List<FrontUser>> selectAllUser() {
        return rroductReviewService.selectAllUser();
    }
}
